#ifndef REGION_H
#define REGION_H

#include <iostream>
#include <cstdlib>
#include <cassert>
#include "opencv/cv.h"
#include "opencv/highgui.h"

using namespace std;

class Region {

  public :
  
  /*Les 4 sous régions*/
  	Region* rSupG;
  	Region* rSupD;
  	Region* rInfG;
  	Region* rInfD;
  	/*Le coin de la region superieur gauche*/
  	int x1;
  	int y1;
  	/*Le coin de la region inferieur droite*/
  	int x2;
  	int y2;
	
	static int nbRegion;
	
  	
  	Region(const int _x1, const int _y1, const int _x2, const int _y2);
  	~Region();
  	
  	bool homogene(IplImage *img);
  	void subdivide(IplImage *img);
  
};

#endif
